package com.zhenhao.xsq.ui.activity.door.module;


import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.door.DoorManageActivity;
import com.zhenhao.xsq.ui.activity.door.contract.DoorManageContract;
import com.zhenhao.xsq.ui.activity.door.presenter.DoorManagePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author William
 * @Package com.yxld.yxchuangxin.xsq.ui.activity.menjin
 * @Description: The moduele of DoorManageActivity, provide field for DoorManageActivity
 * @date 2020/05/28 15:25:29
 */
@Module
public class DoorManageModule {
    private final DoorManageContract.View mView;


    public DoorManageModule(DoorManageContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public DoorManagePresenter provideDoorManagePresenter(HttpAPIWrapper httpAPIWrapper, DoorManageActivity mActivity) {
        return new DoorManagePresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public DoorManageActivity provideDoorManageActivity() {
        return (DoorManageActivity) mView;
    }
}